package com.qiusuo0226.platform.annotation.valid;




import com.qiusuo0226.platform.handler.ValidTypeHandler;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 枚举类型参数校验注解
 * @author qiusuo
 * @date 2023/6/23 15:53
 */
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = {ValidTypeHandler.class})
public @interface ValidType {

    String[] types() default {};
    String message() default "状态有误";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}
